import { get, post } from '@/common/js/request.js'

// https://www.usemock.com
// https://yzclient.usemock.com

export default {
	login: (data) => post('/user/login', data, {
        // baseURL: 'https://mock.com',
    }),
	getUserInfo: (data) => post('/user/info', data),
	bindMobile: (data, params) => post('/user/mobile-auth', data, params),
    getDataList: (data) => post('/api/shop/menu', data, {
        // baseURL: 'https://mock.com',
    }),
	createOrder: (data) => post('/api/order/create', data, {}),
	wxPayOrder: (data) => post('/pay/pay/create', data, {}),
	orderDetail: (data) => post('/api/order/detail', data, {}),
	bindDevice: (data) => post('/api/shop/bind', data, {
		showLoading: true,
		showLoadingText: '设备绑定中..'
	}),
	buy: (data) => post('/buy', data, {
        // baseURL: 'https://mock.com',
    }),
	getGoodsList: (data = {}) => post('/api/shop/menu', data, {
		showLoading: true,
		// baseURL: 'https://yzclient.usemock.com'
	}),
	getBtId: (data, params) => post('/api/device/getbtid', data, params),
	// 代理商
	deviceBind: (data, params) => post('/api/device/bind', data, params),
	getShopList: (data, params) => post('/member/member/tabulation', data, params),
	incomeList: (data) => post('/globalList', data, {
	    baseURL: 'https://yzclient.usemock.com',
	}),
	bindAgent: (data, params = {}) => post('/user/bind-admin', data, params)
}


// 接口改动

//  绑定商家设备(小程序)
//   接口地址修改为:api/device/bind
//   参数修改为:{"shop_id":"9","device_id":"测试","table_num":88,"bt_id":"2ss"} table_num为桌号 bt_id为蓝牙id shop_id必填

//  查询蓝牙id(小程序)
//   接口地址为:api/device/getbtid
//   参数为:{"device_id":"测试1"}

//  配置商家商品列表(pc)
//   接口地址为:member/menu/create
//   参数修改新增:{shop_id:8}

//  新建体现申请(pc)
//   接口地址:/member/cashout/create
//   参数为:{"price":"100"}

//  查询提现列表(pc)
//   接口地址:member/cashout/tabulation
//   参数为:{"type":"0","page":1,"size":10"} type 0 申请中 1通过 2 不通过

//  修改提现记录(pc)
//   接口地址:member/cashout/update
//   参数为:{"type":"0"} type 0 申请中 1通过 2 不通过